import request from '@/config/axios'



//获取左侧树状列表
export const getList = async () => {
    return await request.get({ url: '/quake/file/type/list' })
}

// 文件类型
export const getfileType = async () => {
    return await request.get({ url: '/quake/file/type/list' })
}
// 数据列表
export const getData = async (formList) => {    
    return await request.post({ url: '/quake/file/page', data: formList, headersType: "multipart/form-data", })
}
// 分页数据下载
export const getidList = async (formList) => {
    return await request.post({ url: '/quake/file/list', data: formList, headersType: "multipart/form-data", })
}

// 删除列表数据
export const deleteList = async (ids) => {
    console.log(ids);
    return await request.delete({
        url: '/quake/file/deleteByIds',
        data: ids
    });
};

// 地震列表
export const formalEarthquake = async (formList) => {
    return await request.post({ url: '/earthquakeData/list', data: formList })
}

// 添加文件
export const upAddfile = async (formdata) => {
    return await request.post({ url: '/quake/file/create', 
        data: formdata ,
        headersType: "multipart/form-data", 
    })
}

// 批量下载
export const download = async (ids) => {
    return await request.post({
        url: '/quake/file/downloads',
        data: ids,
        responseType: 'blob'
    });
};

// 获取下拉菜单数据
export const getProduce = async () => {
    return await request.get({ url: 'quake/file/outPutUnit'})
}